package cc.mrbird.febs.accounting.service;

import cc.mrbird.febs.accounting.entity.CompanyProject;

import cc.mrbird.febs.common.entity.QueryRequest;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 *  Service接口
 *
 * @author baoyinlei
 * @date 2021-09-28 23:26:58
 */
public interface ICompanyProjectService extends IService<CompanyProject> {
    /**
     * 查询（分页）
     *
     * @param request QueryRequest
     * @param companyProject companyProject
     * @return IPage<CompanyProject>
     */
    IPage<CompanyProject> findCompanyProjects(QueryRequest request, CompanyProject companyProject);

    /**
     * 查询（所有）
     *
     * @param companyProject companyProject
     * @return List<CompanyProject>
     */
    List<CompanyProject> findCompanyProjects(CompanyProject companyProject);

    /**
     * 新增
     *
     * @param companyProject companyProject
     */
    void createCompanyProject(CompanyProject companyProject);

    /**
     * 修改
     *
     * @param companyProject companyProject
     */
    void updateCompanyProject(CompanyProject companyProject);

    /**
     * 删除
     *
     * @param companyProject companyProject
     */
    void deleteCompanyProject(CompanyProject companyProject);

    /**
     * 根据项目id获取所有对应的公司id
     *
     * @param projectId
     */
    List<Long> getCompanyIdsByPid(Long projectId);
}
